import service from './request'
const request=(options)=>{
    const {url,method,params,data,contentType,responseType}=options
    return service({
        method,
        url,
        params,
        data,
        headers:{
            'Content-Type':contentType
        },
        responseType
    })
}
export default{
    get:(options)=>{
        return request({...options,method:'GET'})
    },
    post:(options)=>{
        return request({...options,method:'POST'})
    },
    put:(options)=>{
        return request({...options,method:'PUT'})
    },
    delete:(options)=>{
        return request({...options,method:'DELETE'})
    }
}

